package com.choosefine.it.basedata.controller;

import io.swagger.annotations.Api;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.choosefine.it.basedata.service.FinishPhotoService;

/**
 * @author 潘钱钦
	下午3:39:30
 *
 */
@RestController
@RequestMapping("/basedata/finishPhoto")
@Api(value="完工照片",description="潘钱钦")
public class FinishPhotoController {
	@Autowired
	private FinishPhotoService finishPhotoService;
	@RequestMapping(value="/getFinishPhotoByUserCodeAndProjectCode/{userCode}/{projectCode}",method=RequestMethod.GET)
	public List<String> getFinishPhotoByUserCodeAndProjectCode(@PathVariable String userCode,@PathVariable String projectCode){
		Map<String, Object> params= new HashMap<>();
		params.put("userCode", userCode);
		params.put("projectCode", projectCode);
		List<String> finishPhotoList=finishPhotoService.findPhotoByUserCodeAndProjectCode(params);
		return finishPhotoList;
		
	}
	
	@RequestMapping(value="/getFinishPhotoByTeamId/{teamid}",method=RequestMethod.GET)
	public List<String> getFinishPhotoByUserCodeAndProjectCode(@PathVariable Integer teamid){
		List<String> finishPhotoList=finishPhotoService.findPhotoByTeamId(teamid);
		return finishPhotoList;
	}	
}
